package cn.itsource.ymcc.client;

import cn.itsource.ymcc.client.fallback.ESCourseFeignClientFallbackFactory;
import cn.itsource.ymcc.doc.CourseDoc;
import cn.itsource.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "service-search",fallbackFactory = ESCourseFeignClientFallbackFactory.class)
@RequestMapping("/course")
public interface ESCourseFeignClient {

    @RequestMapping(value = "/addCourse",method = RequestMethod.POST)
    JSONResult addCourse(@RequestBody CourseDoc doc);
}
